package base.enumtest.fenfa;

import java.util.Random;

public class SoShamBo {
	
	static final int SIZE=20;
	static Random rand=new Random();
	
	static EnumItem newItem(){
		switch (rand.nextInt(3)) {
		default:
		case 0:return new Scissors();
		case 1:return new Paper();
		case 2:return new Rock();
		}
	}
	
	static void match(EnumItem a,EnumItem b){
		System.out.println(a+" VS "+b+": "+a.compete(b));
	}
	
	public static void main(String[] args) {
		for(int i=0;i<SIZE;i++){
			match(newItem(), newItem());
		}
	}
	
}
